{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "    <div class=\"bk-root\">\n",
       "        <a href=\"http://bokeh.pydata.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n",
       "        <span id=\"456b555c-019c-4921-a674-b4edfe002aaf\">Loading BokehJS ...</span>\n",
       "    </div>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "application/javascript": [
       "\n",
       "(function(global) {\n",
       "  function now() {\n",
       "    return new Date();\n",
       "  }\n",
       "\n",
       "  var force = \"1\";\n",
       "\n",
       "  if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force !== \"\") {\n",
       "    window._bokeh_onload_callbacks = [];\n",
       "    window._bokeh_is_loading = undefined;\n",
       "  }\n",
       "\n",
       "  function run_callbacks() {\n",
       "    window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
       "    delete window._bokeh_onload_callbacks\n",
       "    console.info(\"Bokeh: all callbacks have finished\");\n",
       "  }\n",
       "\n",
       "  function load_libs(js_urls, callback) {\n",
       "    window._bokeh_onload_callbacks.push(callback);\n",
       "    if (window._bokeh_is_loading > 0) {\n",
       "      console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "      return null;\n",
       "    }\n",
       "    if (js_urls == null || js_urls.length === 0) {\n",
       "      run_callbacks();\n",
       "      return null;\n",
       "    }\n",
       "    console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "    window._bokeh_is_loading = js_urls.length;\n",
       "    for (var i = 0; i < js_urls.length; i++) {\n",
       "      var url = js_urls[i];\n",
       "      var s = document.createElement('script');\n",
       "      s.src = url;\n",
       "      s.async = false;\n",
       "      s.onreadystatechange = s.onload = function() {\n",
       "        window._bokeh_is_loading--;\n",
       "        if (window._bokeh_is_loading === 0) {\n",
       "          console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
       "          run_callbacks()\n",
       "        }\n",
       "      };\n",
       "      s.onerror = function() {\n",
       "        console.warn(\"failed to load library \" + url);\n",
       "      };\n",
       "      console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "      document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "    }\n",
       "  };\n",
       "\n",
       "  var js_urls = ['https://cdn.pydata.org/bokeh/release/bokeh-0.12.1.min.js', 'https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.1.min.js', 'https://cdn.pydata.org/bokeh/release/bokeh-compiler-0.12.1.min.js'];\n",
       "\n",
       "  var inline_js = [\n",
       "    function(Bokeh) {\n",
       "      Bokeh.set_log_level(\"info\");\n",
       "    },\n",
       "    \n",
       "    function(Bokeh) {\n",
       "      \n",
       "      Bokeh.$(\"#456b555c-019c-4921-a674-b4edfe002aaf\").text(\"BokehJS successfully loaded\");\n",
       "      var kernel = Jupyter.notebook.kernel\n",
       "      if (kernel.execute !== undefined) {\n",
       "          kernel.execute(\"import bokeh.io; bokeh.io._nb_loaded = True\");\n",
       "      }\n",
       "    },\n",
       "    function(Bokeh) {\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.12.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.12.1.min.css\");\n",
       "      console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.1.min.css\");\n",
       "      Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.12.1.min.css\");\n",
       "    }\n",
       "  ];\n",
       "\n",
       "  function run_inline_js() {\n",
       "    for (var i = 0; i < inline_js.length; i++) {\n",
       "      inline_js[i](window.Bokeh);\n",
       "    }\n",
       "  }\n",
       "\n",
       "  if (window._bokeh_is_loading === 0) {\n",
       "    console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "    run_inline_js();\n",
       "  } else {\n",
       "    load_libs(js_urls, function() {\n",
       "      console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "      run_inline_js();\n",
       "    });\n",
       "  }\n",
       "}(this));"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from bokeh.plotting import figure, output_notebook, show\n",
    "\n",
    "# output to static HTML file\n",
    "output_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "\n",
       "    <div class=\"bk-root\">\n",
       "        <div class=\"plotdiv\" id=\"a627fb39-b6a7-4a0e-a078-dca760b802c9\"></div>\n",
       "    </div>\n",
       "<script type=\"text/javascript\">\n",
       "  \n",
       "  (function(global) {\n",
       "    function now() {\n",
       "      return new Date();\n",
       "    }\n",
       "  \n",
       "    var force = \"\";\n",
       "  \n",
       "    if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force !== \"\") {\n",
       "      window._bokeh_onload_callbacks = [];\n",
       "      window._bokeh_is_loading = undefined;\n",
       "    }\n",
       "  \n",
       "    function run_callbacks() {\n",
       "      window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
       "      delete window._bokeh_onload_callbacks\n",
       "      console.info(\"Bokeh: all callbacks have finished\");\n",
       "    }\n",
       "  \n",
       "    function load_libs(js_urls, callback) {\n",
       "      window._bokeh_onload_callbacks.push(callback);\n",
       "      if (window._bokeh_is_loading > 0) {\n",
       "        console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
       "        return null;\n",
       "      }\n",
       "      if (js_urls == null || js_urls.length === 0) {\n",
       "        run_callbacks();\n",
       "        return null;\n",
       "      }\n",
       "      console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
       "      window._bokeh_is_loading = js_urls.length;\n",
       "      for (var i = 0; i < js_urls.length; i++) {\n",
       "        var url = js_urls[i];\n",
       "        var s = document.createElement('script');\n",
       "        s.src = url;\n",
       "        s.async = false;\n",
       "        s.onreadystatechange = s.onload = function() {\n",
       "          window._bokeh_is_loading--;\n",
       "          if (window._bokeh_is_loading === 0) {\n",
       "            console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
       "            run_callbacks()\n",
       "          }\n",
       "        };\n",
       "        s.onerror = function() {\n",
       "          console.warn(\"failed to load library \" + url);\n",
       "        };\n",
       "        console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
       "        document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
       "      }\n",
       "    };var element = document.getElementById(\"a627fb39-b6a7-4a0e-a078-dca760b802c9\");\n",
       "    if (element == null) {\n",
       "      console.log(\"Bokeh: ERROR: autoload.js configured with elementid 'a627fb39-b6a7-4a0e-a078-dca760b802c9' but no matching script tag was found. \")\n",
       "      return false;\n",
       "    }\n",
       "  \n",
       "    var js_urls = [];\n",
       "  \n",
       "    var inline_js = [\n",
       "      function(Bokeh) {\n",
       "        Bokeh.$(function() {\n",
       "            var docs_json = {\"08eaa323-0e99-4d9e-8b2c-d9c0cdeb63ab\":{\"roots\":{\"references\":[{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"x\"],\"data\":{\"x\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0],\"y\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0]}},\"id\":\"d448ddb9-ef57-4a2c-8e78-253e99a505b4\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"5fe74ff9-179c-40e7-8d74-3dd90b094061\",\"type\":\"Line\"},{\"attributes\":{\"plot\":{\"id\":\"11f98406-eae3-4dad-898c-bce9773e105e\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"00a60425-5250-4c07-adbc-0ea90f6b0e71\",\"type\":\"PanTool\"},{\"attributes\":{\"axis_label\":\"sections\",\"formatter\":{\"id\":\"b9fd0faf-cd5f-4004-8b28-5e0ad7903974\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"11f98406-eae3-4dad-898c-bce9773e105e\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"88e751e6-cd15-4576-845d-d78ae76037e2\",\"type\":\"BasicTicker\"}},\"id\":\"711e9e16-5edb-436c-a561-150a1ceb1f48\",\"type\":\"LinearAxis\"},{\"attributes\":{\"overlay\":{\"id\":\"9fa55cec-4e39-455c-9d16-5ef3890441e3\",\"type\":\"BoxAnnotation\"},\"plot\":{\"id\":\"11f98406-eae3-4dad-898c-bce9773e105e\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"8a73ca0e-7433-409c-9290-9d983d332ba3\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"plot\":{\"id\":\"11f98406-eae3-4dad-898c-bce9773e105e\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"1d935b4d-1ce1-4e1f-8748-5f0e0c2c28c3\",\"type\":\"SaveTool\"},{\"attributes\":{},\"id\":\"88e751e6-cd15-4576-845d-d78ae76037e2\",\"type\":\"BasicTicker\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"x\"],\"data\":{\"x\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0],\"y\":[1.2589254117941673,3.1622776601683795,10.0,31.622776601683793,100.0,316.22776601683796,1000.0]}},\"id\":\"8f1acff1-1095-402e-9a50-ef80f73fc58c\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"x\"],\"data\":{\"x\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0],\"y\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0]}},\"id\":\"6810ddf9-596c-4f59-8433-90a8bfbdba1c\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"data_source\":{\"id\":\"49067fde-2192-43d3-b8db-cf3f89332b5c\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"58407b4d-2fb4-42a8-b6ef-26bc8fb44741\",\"type\":\"Line\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"35e9973c-d11b-4ed0-9d8b-4bb6f6b1fa70\",\"type\":\"Line\"},\"selection_glyph\":null},\"id\":\"c47d3c00-c492-4292-92b0-e9e2fbb93adb\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"b9fd0faf-cd5f-4004-8b28-5e0ad7903974\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"data_source\":{\"id\":\"22eeac8f-2a2d-4575-9cbc-55111517c85d\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"0c6b3bde-62a6-49c1-aec4-3d135b373a8d\",\"type\":\"Line\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"db119437-5128-43e2-8896-8cc365271986\",\"type\":\"Line\"},\"selection_glyph\":null},\"id\":\"08492f76-c717-42da-88ee-9c0273948efc\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_color\":{\"value\":\"orange\"},\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"0c6b3bde-62a6-49c1-aec4-3d135b373a8d\",\"type\":\"Line\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"x\"],\"data\":{\"x\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0],\"y\":[1.023292992280754,1.7782794100389228,10.0,177.82794100389228,10000.0,1778279.410038923,1000000000.0]}},\"id\":\"22eeac8f-2a2d-4575-9cbc-55111517c85d\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"line_color\":{\"value\":\"#1f77b4\"},\"line_width\":{\"value\":3},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"58407b4d-2fb4-42a8-b6ef-26bc8fb44741\",\"type\":\"Line\"},{\"attributes\":{\"line_color\":{\"value\":\"red\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"978fc30f-feed-48f6-96d3-5fa007d46b5c\",\"type\":\"Line\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"x\"],\"data\":{\"x\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0],\"y\":[1.2589254117941673,3.1622776601683795,10.0,31.622776601683793,100.0,316.22776601683796,1000.0]}},\"id\":\"96a57889-0049-48ce-9682-616bdea5742e\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"11f98406-eae3-4dad-898c-bce9773e105e\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"4e8eae08-bd5f-4dbc-92b8-ebb5a6444774\",\"type\":\"LogTicker\"}},\"id\":\"e460dc67-508f-4d73-818e-2b77b5d2e7fa\",\"type\":\"Grid\"},{\"attributes\":{\"callback\":null,\"column_names\":[\"y\",\"x\"],\"data\":{\"x\":[0.1,0.5,1.0,1.5,2.0,2.5,3.0],\"y\":[0.010000000000000002,0.25,1.0,2.25,4.0,6.25,9.0]}},\"id\":\"49067fde-2192-43d3-b8db-cf3f89332b5c\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"fill_color\":{\"value\":\"white\"},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"99492ca9-9341-4764-a602-5cfc40d2721f\",\"type\":\"Circle\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"00a60425-5250-4c07-adbc-0ea90f6b0e71\",\"type\":\"PanTool\"},{\"id\":\"8a73ca0e-7433-409c-9290-9d983d332ba3\",\"type\":\"BoxZoomTool\"},{\"id\":\"a67cd376-0494-4da0-96d2-f47c39baada7\",\"type\":\"ResetTool\"},{\"id\":\"1d935b4d-1ce1-4e1f-8748-5f0e0c2c28c3\",\"type\":\"SaveTool\"}]},\"id\":\"7eca2b80-dc19-4b54-a6fa-64f21eac85d4\",\"type\":\"Toolbar\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"9fa55cec-4e39-455c-9d16-5ef3890441e3\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"line_dash\":[4,4],\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"db119437-5128-43e2-8896-8cc365271986\",\"type\":\"Line\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":8},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"a89823ce-f0ab-49f7-8246-e58959dae3f6\",\"type\":\"Circle\"},{\"attributes\":{\"ticker\":null},\"id\":\"f10661a7-22fd-454b-a81e-95e0f977b9b6\",\"type\":\"LogTickFormatter\"},{\"attributes\":{\"callback\":null},\"id\":\"bb8c5aaa-74db-410a-b47c-fe67230e8759\",\"type\":\"DataRange1d\"},{\"attributes\":{\"fill_color\":{\"value\":\"red\"},\"line_color\":{\"value\":\"red\"},\"size\":{\"units\":\"screen\",\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"8300b9a6-9156-4362-b850-3d0341a67a3d\",\"type\":\"Circle\"},{\"attributes\":{\"axis_label\":\"particles\",\"formatter\":{\"id\":\"f10661a7-22fd-454b-a81e-95e0f977b9b6\",\"type\":\"LogTickFormatter\"},\"plot\":{\"id\":\"11f98406-eae3-4dad-898c-bce9773e105e\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"4e8eae08-bd5f-4dbc-92b8-ebb5a6444774\",\"type\":\"LogTicker\"}},\"id\":\"9df52ac3-37d2-497b-8c5c-79dc598025be\",\"type\":\"LogAxis\"},{\"attributes\":{\"data_source\":{\"id\":\"96a57889-0049-48ce-9682-616bdea5742e\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"8300b9a6-9156-4362-b850-3d0341a67a3d\",\"type\":\"Circle\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"f190d6a5-a15b-4585-bfd5-a8c1395e429d\",\"type\":\"Circle\"},\"selection_glyph\":null},\"id\":\"b9a3497f-fa4a-4acd-969c-2c49220031ff\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"plot\":{\"id\":\"11f98406-eae3-4dad-898c-bce9773e105e\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"a67cd376-0494-4da0-96d2-f47c39baada7\",\"type\":\"ResetTool\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"size\":{\"units\":\"screen\",\"value\":6},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"f190d6a5-a15b-4585-bfd5-a8c1395e429d\",\"type\":\"Circle\"},{\"attributes\":{\"num_minor_ticks\":10},\"id\":\"4e8eae08-bd5f-4dbc-92b8-ebb5a6444774\",\"type\":\"LogTicker\"},{\"attributes\":{\"below\":[{\"id\":\"711e9e16-5edb-436c-a561-150a1ceb1f48\",\"type\":\"LinearAxis\"}],\"left\":[{\"id\":\"9df52ac3-37d2-497b-8c5c-79dc598025be\",\"type\":\"LogAxis\"}],\"renderers\":[{\"id\":\"711e9e16-5edb-436c-a561-150a1ceb1f48\",\"type\":\"LinearAxis\"},{\"id\":\"d83da6a5-6572-4422-aaa1-7f93b206dc20\",\"type\":\"Grid\"},{\"id\":\"9df52ac3-37d2-497b-8c5c-79dc598025be\",\"type\":\"LogAxis\"},{\"id\":\"e460dc67-508f-4d73-818e-2b77b5d2e7fa\",\"type\":\"Grid\"},{\"id\":\"9fa55cec-4e39-455c-9d16-5ef3890441e3\",\"type\":\"BoxAnnotation\"},{\"id\":\"caa0e0be-7f23-42ae-9cbf-ecd196c51b23\",\"type\":\"Legend\"},{\"id\":\"62a21ef4-da2a-49a2-9ad4-c43c24c1b61d\",\"type\":\"GlyphRenderer\"},{\"id\":\"27d4a59d-1ce9-403f-8046-7edf8e24fbf6\",\"type\":\"GlyphRenderer\"},{\"id\":\"c47d3c00-c492-4292-92b0-e9e2fbb93adb\",\"type\":\"GlyphRenderer\"},{\"id\":\"dd0c15fe-219f-40fc-b95b-01198ff93f6e\",\"type\":\"GlyphRenderer\"},{\"id\":\"b9a3497f-fa4a-4acd-969c-2c49220031ff\",\"type\":\"GlyphRenderer\"},{\"id\":\"08492f76-c717-42da-88ee-9c0273948efc\",\"type\":\"GlyphRenderer\"}],\"title\":{\"id\":\"b2c0e62c-03c0-4f06-ab1b-1f75c00bc362\",\"type\":\"Title\"},\"tool_events\":{\"id\":\"c707f0e1-43b4-49c8-a66c-40d66cd49c41\",\"type\":\"ToolEvents\"},\"toolbar\":{\"id\":\"7eca2b80-dc19-4b54-a6fa-64f21eac85d4\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"bb8c5aaa-74db-410a-b47c-fe67230e8759\",\"type\":\"DataRange1d\"},\"y_mapper_type\":\"log\",\"y_range\":{\"id\":\"37a3638d-a093-4017-8670-13d9ac12b2ef\",\"type\":\"Range1d\"}},\"id\":\"11f98406-eae3-4dad-898c-bce9773e105e\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"data_source\":{\"id\":\"d448ddb9-ef57-4a2c-8e78-253e99a505b4\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"99492ca9-9341-4764-a602-5cfc40d2721f\",\"type\":\"Circle\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"a89823ce-f0ab-49f7-8246-e58959dae3f6\",\"type\":\"Circle\"},\"selection_glyph\":null},\"id\":\"27d4a59d-1ce9-403f-8046-7edf8e24fbf6\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"plot\":null,\"text\":\"log axis example\"},\"id\":\"b2c0e62c-03c0-4f06-ab1b-1f75c00bc362\",\"type\":\"Title\"},{\"attributes\":{\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"290fbfb3-1921-42bc-bd68-8b757ad50ef4\",\"type\":\"Line\"},{\"attributes\":{\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"line_width\":{\"value\":3},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"35e9973c-d11b-4ed0-9d8b-4bb6f6b1fa70\",\"type\":\"Line\"},{\"attributes\":{\"data_source\":{\"id\":\"6810ddf9-596c-4f59-8433-90a8bfbdba1c\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"290fbfb3-1921-42bc-bd68-8b757ad50ef4\",\"type\":\"Line\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"5fe74ff9-179c-40e7-8d74-3dd90b094061\",\"type\":\"Line\"},\"selection_glyph\":null},\"id\":\"62a21ef4-da2a-49a2-9ad4-c43c24c1b61d\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"x\":{\"field\":\"x\"},\"y\":{\"field\":\"y\"}},\"id\":\"1ce513ab-0fba-45fa-bf47-3edaa20e5831\",\"type\":\"Line\"},{\"attributes\":{\"callback\":null,\"end\":100000000000,\"start\":0.001},\"id\":\"37a3638d-a093-4017-8670-13d9ac12b2ef\",\"type\":\"Range1d\"},{\"attributes\":{\"data_source\":{\"id\":\"8f1acff1-1095-402e-9a50-ef80f73fc58c\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"978fc30f-feed-48f6-96d3-5fa007d46b5c\",\"type\":\"Line\"},\"hover_glyph\":null,\"nonselection_glyph\":{\"id\":\"1ce513ab-0fba-45fa-bf47-3edaa20e5831\",\"type\":\"Line\"},\"selection_glyph\":null},\"id\":\"dd0c15fe-219f-40fc-b95b-01198ff93f6e\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"c707f0e1-43b4-49c8-a66c-40d66cd49c41\",\"type\":\"ToolEvents\"},{\"attributes\":{\"legends\":[[\"y=x\",[{\"id\":\"62a21ef4-da2a-49a2-9ad4-c43c24c1b61d\",\"type\":\"GlyphRenderer\"},{\"id\":\"27d4a59d-1ce9-403f-8046-7edf8e24fbf6\",\"type\":\"GlyphRenderer\"}]],[\"y=x^2\",[{\"id\":\"c47d3c00-c492-4292-92b0-e9e2fbb93adb\",\"type\":\"GlyphRenderer\"}]],[\"y=10^x\",[{\"id\":\"dd0c15fe-219f-40fc-b95b-01198ff93f6e\",\"type\":\"GlyphRenderer\"},{\"id\":\"b9a3497f-fa4a-4acd-969c-2c49220031ff\",\"type\":\"GlyphRenderer\"}]],[\"y=10^x^2\",[{\"id\":\"08492f76-c717-42da-88ee-9c0273948efc\",\"type\":\"GlyphRenderer\"}]]],\"plot\":{\"id\":\"11f98406-eae3-4dad-898c-bce9773e105e\",\"subtype\":\"Figure\",\"type\":\"Plot\"}},\"id\":\"caa0e0be-7f23-42ae-9cbf-ecd196c51b23\",\"type\":\"Legend\"},{\"attributes\":{\"plot\":{\"id\":\"11f98406-eae3-4dad-898c-bce9773e105e\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"88e751e6-cd15-4576-845d-d78ae76037e2\",\"type\":\"BasicTicker\"}},\"id\":\"d83da6a5-6572-4422-aaa1-7f93b206dc20\",\"type\":\"Grid\"}],\"root_ids\":[\"11f98406-eae3-4dad-898c-bce9773e105e\"]},\"title\":\"Bokeh Application\",\"version\":\"0.12.1\"}};\n",
       "            var render_items = [{\"docid\":\"08eaa323-0e99-4d9e-8b2c-d9c0cdeb63ab\",\"elementid\":\"a627fb39-b6a7-4a0e-a078-dca760b802c9\",\"modelid\":\"11f98406-eae3-4dad-898c-bce9773e105e\",\"notebook_comms_target\":\"55216879-fd7b-4246-8374-1d05fa6f0510\"}];\n",
       "            \n",
       "            Bokeh.embed.embed_items(docs_json, render_items);\n",
       "        });\n",
       "      },\n",
       "      function(Bokeh) {\n",
       "      }\n",
       "    ];\n",
       "  \n",
       "    function run_inline_js() {\n",
       "      for (var i = 0; i < inline_js.length; i++) {\n",
       "        inline_js[i](window.Bokeh);\n",
       "      }\n",
       "    }\n",
       "  \n",
       "    if (window._bokeh_is_loading === 0) {\n",
       "      console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
       "      run_inline_js();\n",
       "    } else {\n",
       "      load_libs(js_urls, function() {\n",
       "        console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n",
       "        run_inline_js();\n",
       "      });\n",
       "    }\n",
       "  }(this));\n",
       "</script>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<p><code>&lt;Bokeh Notebook handle for <strong>In[2]</strong>&gt;</code></p>"
      ],
      "text/plain": [
       "<bokeh.io._CommsHandle at 0x10d2220d0>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# prepare some data\n",
    "x = [0.1, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0]\n",
    "y0 = [i**2 for i in x]\n",
    "y1 = [10**i for i in x]\n",
    "y2 = [10**(i**2) for i in x]\n",
    "\n",
    "# create a new plot\n",
    "p = figure(\n",
    "   tools=\"pan,box_zoom,reset,save\",\n",
    "   y_axis_type=\"log\", y_range=[0.001, 10**11], title=\"log axis example\",\n",
    "   x_axis_label='sections', y_axis_label='particles'\n",
    ")\n",
    "\n",
    "# add some renderers\n",
    "p.line(x, x, legend=\"y=x\")\n",
    "p.circle(x, x, legend=\"y=x\", fill_color=\"white\", size=8)\n",
    "p.line(x, y0, legend=\"y=x^2\", line_width=3)\n",
    "p.line(x, y1, legend=\"y=10^x\", line_color=\"red\")\n",
    "p.circle(x, y1, legend=\"y=10^x\", fill_color=\"red\", line_color=\"red\", size=6)\n",
    "p.line(x, y2, legend=\"y=10^x^2\", line_color=\"orange\", line_dash=\"4 4\")\n",
    "\n",
    "# show the results\n",
    "show(p)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
